#include "DXUT.h"

#ifndef CLUSTER_H
#define CLUSTER_H

#include "Chunk.h"
#include "Heightmap.h"

//#define CHUNKCOUNT			4096

class Cluster
{
private:
	int	  _x;
	int	  _z;
	void		*pWorld;

	Chunk		*pChunks[16];
public:
	Cluster(void* world, int x, int z);
	~Cluster();

	void lightPass();
	void lightPass2();
	void resetLight();

	void generateVB(ID3D11Device* pd3dDevice);
	void Release();
	void render(const D3DXVECTOR3 * eye, const D3DXVECTOR3 * dir, ID3D11DeviceContext* pImmediateContext);

	Block getBlock(int x, int z, int y);
	void setBlock(int x, int z, int y, Block block);
};

#endif